# 元类，构造字典映射
class BaseMeta(type):

    def __new__(cls, name, bases, dct):
        mappings = {}
        for k, v in dct.items():
            if k.endswith("_DICTONARY"):
                mappings[k] = v
        dct['__mappings__'] = mappings
        return super().__new__(cls, name, bases, dct)
